Hello! I have a variable in the Rational Publishing Template, that contains the object attribute "myAttribute". Is there a possibility to print out obj."myAttribute" in a Text Box? Normally i drag the Object Attributes to the text field. But that only works with fix names.
With best regards, Bjoern_Karpenstein - Tue Jul 07 08:28:13 EDT 2015 |
Re: Use RPE variable to get Object Attribute in Publishing Engine Template? Have you tried something like string my_attribute = "object text" Object o = current print o.my_attribute "\n" // or print probeAttr_(o, my_attribute) "\n" ?? |
Re: Use RPE variable to get Object Attribute in Publishing Engine Template? pommCannelle - Tue Jul 07 10:57:49 EDT 2015 Have you tried something like string my_attribute = "object text" Object o = current print o.my_attribute "\n" // or print probeAttr_(o, my_attribute) "\n" ?? Hi pommCannelle, we are using the Rational Publishing Engine v.1.1.1.2 for publishing our documents, and i have a dynamic variable "selectedVariant" in the context of the template available, that i even can print out to the document. "string selectedVariant" contains the Attribute Name, that should be printed out to the document
In the Module.Object Container Loop for (Module.Objects.Attribute.name=selectedVariant) i print out: Module.Objects.Attribute._value
That works! But now the problem: I have to filter the objects Module.Objects.Attribute._value=="draft" or Module.Objects.Attribute._value=="approval" when Module.Objects.Attribute.name==selectedVariant (i.e. selectedVariant=="Product Variant 1") I cannot get access to Module.Objects.Attribute._value in conditions. How can i do this? I already saw a RPE 1.2. tutorial about adding custom attributes to a template, but i cannot make it because it seems to be different to RPE 1.1.1.2 Please see the attached screenshot
Attachments filter_Object_loop_for_object-attribute_value.jpg |